﻿using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using WoChu.RfClient.Entity;

namespace WoChu.RfClient.Duty
{
    public partial class FrmCellno : Form
    {
        public FrmCellno()
        {
            InitializeComponent();
        }

        public static bool IsOK = false;
        public static string valCellno = null;

        private void FrmCellno_Load(object sender, EventArgs e)
        {
            List<LookupItem> lstCellno = Duty.PublicUIRule.NewInstance.GetLookUpItemList("OFFSHELVESCELLNO").DATA;// Duty.OffShelvesOrderWCUIRule.NewInstance.GetCellnoListWC().DATA;
            if (lstCellno == null || lstCellno.Count==0)
            {
                MessageBox.Show("获取库位为空！");
                this.Close();
                return;
            }
            
            this.cbbCellno.DataSource = lstCellno;
            this.cbbCellno.DisplayMember = "Value";
            this.cbbCellno.ValueMember = "Value";
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            valCellno = this.cbbCellno.Text.Trim();
            if (string.IsNullOrEmpty(valCellno))
            {
                MessageBox.Show("请选择库位！");
                return;
            }
            else
            {
                IsOK = true; 
            }
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            IsOK = false;
            this.Close();
        }

       
    }
}